package com.edu.client.mainclient;

import com.edu.client.config.SpringClientConfig;
import com.edu.client.pojo.Student;
import com.edu.client.service.StudentService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.List;

public class ClientTest01 {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext annotationConfigApplicationContext =
				new AnnotationConfigApplicationContext(SpringClientConfig.class);
		StudentService studentService = annotationConfigApplicationContext.getBean(StudentService.class);
		Student student = annotationConfigApplicationContext.getBean(Student.class);
		List<Student> studentList = studentService.getStudentList();
		studentList.forEach(System.out::println);
		System.out.println(student);
	}
}
